<?php 

require_once '../config.php';

if ($_POST) {
  operators_login($_POST['email'], $_POST['password']);
  header('location: operator.php');
}

?>

<?php include dirname(__FILE__) . '/header.php' ?>

<?php if (operators_is_auth()): ?>
  <a href="javascript:void()" onclick="window.open('/account/operator.php', 'Operator', 'menubar=no,location=no,resizable=no,scrollbars=no,status=yes,width=780,height=600')">Open operators console</a>  
<?php endif ?>

<form action="" method="POST">
  
  E-Mail<br />
  <input type="text" name="email" /><br />

  Password<br />
  <input type="text" name="password" /><br />
  
  <input type="submit" value="Login" /> | <a href="/account/register.php">Registration</a>
  
</form>

<?php include dirname(__FILE__) . '/footer.php' ?>